﻿using System;
using System.Collections.Generic;
using System.Text;
using BCData.Common.FlowRecord;
using BCDto.Common.FlowRecord;
using BCEntity.Common.FlowRecord;
using BCService.Utils;

namespace BCService.Common.FlowRecord
{
    public class UserFlowRecordService : IUserFlowRecordService
    {
        private readonly IUserFlowRecordData userFlowRecordData;

        public UserFlowRecordService(IUserFlowRecordData userFlowRecordData)
        {
            this.userFlowRecordData = userFlowRecordData;
        }

        public UserFlowRecordDto AddAsync(UserFlowRecordDto flowRecordDto)
        {
            var task = this.userFlowRecordData.AddAsync(flowRecordDto.As<UserFlowRecordEntity>());
            return task.GetAwaiter().GetResult().As<UserFlowRecordDto>();
        }

        //public decimal GetDriverPaymentAccountBalance(string driverName, string phone, string vehicleNo, DateTime? startDate, DateTime? endDate)
        //{
        //    return this.userFlowRecordData.GetDriverPaymentAccountBalance(driverName, phone, vehicleNo, startDate, endDate).Result;
        //}
    }
}